package com.gmp.rooms.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gmp.common.annotation.Excel;
import com.gmp.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;


/**
 * 设备巡检记录对象 equipment_inspection
 *
 * @author Koi
 * @date 2025-08-02
 */
@Data
@TableName(resultMap = "com.gmp.rooms.mapper.EquipmentInspectionMapper.EquipmentInspectionResult")
public class EquipmentInspection extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 厂房ID
     */
    @Excel(name = "厂房ID")
    private String roomCode;

    /**
     * 设备ID
     */
    @Excel(name = "设备ID")
    private String facilityCode;

    /**
     * 评估内容
     */
    @Excel(name = "评估内容")
    private String evaluationContent;

    /**
     * 状态，如：正常、异常、待维修等
     */
    @Excel(name = "状态，如：正常、异常、待维修等")
    private String status;

    /**
     * 巡检时间，默认当前时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "巡检时间，默认当前时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date inspectionTime;

    /**
     * 巡检人员
     */
    @Excel(name = "巡检人员")
    private String inspector;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /**
     * 逻辑删除
     */
    /** 逻辑删除标记：0-未删除，1-已删除 */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDelete;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setRoomCode(String roomCode) {
        this.roomCode = roomCode;
    }

    public String getRoomCode() {
        return roomCode;
    }

    public void setFacilityCode(String facilityCode) {
        this.facilityCode = facilityCode;
    }

    public String getFacilityCode() {
        return facilityCode;
    }

    public void setEvaluationContent(String evaluationContent) {
        this.evaluationContent = evaluationContent;
    }

    public String getEvaluationContent() {
        return evaluationContent;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setInspectionTime(Date inspectionTime) {
        this.inspectionTime = inspectionTime;
    }

    public Date getInspectionTime() {
        return inspectionTime;
    }

    public void setInspector(String inspector) {
        this.inspector = inspector;
    }

    public String getInspector() {
        return inspector;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() {
        return createdAt;
    }


    public Integer getIsDeleted() {
        return isDelete;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("roomCode", getRoomCode())
                .append("facilityCode", getFacilityCode())
                .append("evaluationContent", getEvaluationContent())
                .append("status", getStatus())
                .append("inspectionTime", getInspectionTime())
                .append("inspector", getInspector())
                .append("createdAt", getCreatedAt())
                .append("isDeleted", getIsDeleted())
                .toString();
    }
}

